<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>心悦酒店管理系统(xinyue.com)-酒店预订、酒店查询、宾馆住宿预订</title>

    <!-- App favicon -->
    <link rel="shortcut icon" href="/assets/images/favicon.ico">

    <link href="/assets/plugins/jvectormap/jquery-jvectormap-2.0.2.css" rel="stylesheet">

    <!-- App css -->
    <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/icons.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/metismenu.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/style.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <div class="col-lg-12" style="padding-top:15px;">
        <!-- big box -->
        <div class="big-box">
            <div class="col-lg-6">

                <form method="POST" action="/hotel/users/users/update">
                    <div class="card">
                        <div class="card-head">
                            <div class="left">资料更新</div>
                            <div class="right">
                                <i class="zmdi zmdi-chevron-down"></i>
                                <i class="zmdi zmdi-refresh-sync"></i>
                                <i class="zmdi zmdi-close-circle-o"></i>
                            </div>
                        </div>
                        <div class="card-body">
                            <div class="form">
                                <p>用户名</p>
                                <input name="username" class="form-control" readonly th:value="${user.username}"
                                    type="text" placeholder="">
                                <input name="id" type="hidden" th:value="${user.id}">
                            </div>

                            <div class="form">
                                <p style="">头像
                                    <a th:href="@{user.thumb}" th:if="${user.thumb != null}" target="_blank"></a>
                                    <br>
                                    <input type="hidden" id="thumb" th:value="${user.thumb}" name="thumb">
                                    <a href="javascript:;" style="width:400px;display:block;"
                                        class="uploadImg ">点击上传</a>
                                </p>
                            </div>


                            <div>
                                <div class="form" style="display:inline-block">
                                    <p>姓名</p>
                                    <input name="realname" class="form-control" type="text" th:value="${user.realname}">
                                </div>



                                <div class="form" style="display:inline-block">
                                    <p>年龄</p>
                                    <input name="age" required class="form-control" type="text" th:value="${user.age}">
                                </div>
                                <div class="form" style="display:inline-block">
                                    <p>性别</p>

                                    <select name="sex">
                                        <option value="1" th:selected="${user.sex == 1}">男</option>
                                        <option value="2" th:selected="${user.sex == 1}">女</option>
                                    </select>
                                </div>

                            </div>
                            <div class="form">
                                <p>身份证</p>
                                <input name="ecard" class="form-control" type="text" th:value="${user.ecard}">
                            </div>
                            <div class="form">
                                <p>地址</p>
                                <input name="address" class="form-control" type="text" th:value="${user.address}">
                            </div>


                            <div class="form">
                                <p>邮箱</p>
                                <input name="email" class="form-control" type="text" th:value="${user.email}">
                            </div>

                            <div class="form">
                                <p>QQ</p>
                                <input name="qq" class="form-control" type="text" th:value="${user.qq}">
                            </div>

                            <div class="form">
                                <p>电话</p>
                                <input name="tel" class="form-control" type="text" th:value="${user.tel}">
                            </div>


                            <div class="form">
                                <p></p>
                                <button class="am-btn am-btn-primary" type="submit">提交</button>
                            </div>
                            <div class="form">
                                <h1 style="height:50px;"></h1>
                            </div>
                        </div>
                    </div>

                </form>


            </div>

        </div>
    </div>
    <!-- jQuery  -->
    <script src="/assets/js/jquery.min.js"></script>
    <script src="/assets/js/bootstrap.bundle.min.js"></script>
    <script src="/assets/js/metisMenu.min.js"></script>
    <script src="/assets/js/waves.min.js"></script>
    <script src="/assets/js/jquery.slimscroll.min.js"></script>

    <script src="/assets/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js"></script>
    <script src="/assets/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>

    <script src="/assets/plugins/moment/moment.js"></script>
    <script src="/assets/plugins/apexcharts/apexcharts.min.js"></script>        
    <script src="/assets/pages/jquery.dashboard.init.js"></script>
    <!-- App js -->
    <script src="/assets/js/app.js"></script>  
    <script src="/source/scripts/window.js"></script>
    <script src="/source/js.js"></script>

    <script>
        $().ready(function(){
            $(".uploadImg").click(function(){
                openWindow("/upload.jsp");
            });
            $("#thumb").on("input",function(){
                $(".oldImg").attr("src","/"+$("#thumb").val());
            });
        });
    </script>
    <link href="/toastr-master/toastr.min.css" rel="stylesheet" type="text/css" />        
    <script src="/toastr-master/toastr.min.js"></script>
</body>

</html>